﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BL.Entity
{

    public class NumberDTO
    {
        public string Number { get; set; }
        public string NumType { get; set; }
        public decimal Over_Price { get; set; }
        public decimal Under_Price { get; set; }
        public decimal Tod_Price { get; set; }
        public decimal Cut_Out { get; set; }
        public DateTime CreateDate { get; set; }
        public string CreateBy { get; set; }
        public DateTime UpdateDate { get; set; }
        public string UpdateBy { get; set; }
    }
    public class ReportNumDTO
    {
        public string Number { get; set; }
        public string NumType { get; set; }
        public decimal Price { get; set; }
        public decimal CutOutSummary { get; set; }
        public decimal OverCut { get; set; }
        public int Page { get; set; }
        public string ShowNumColumn1 { get; set; }
        public string ShowNumColumn2 { get; set; }
        public string ShowNumColumn3 { get; set; }
        public string ShowNumColumn4 { get; set; }
        public string ShowNumColumn5 { get; set; }
    }
    public class ShowNumberDTO
    {
        public string Number { get; set; }
        public string ColumnNameShow { get; set; }
        public decimal Price { get; set; }
        public decimal OrgPrice { get; set; }
        public decimal Over { get; set; }
        public decimal Under { get; set; }
        public decimal Tod { get; set; }
        public bool IsOver { get { return this.OrgPrice > 0 && this.OrgPrice > this.OverEn && this.OverSt > 0 && this.OverEn > this.OverSt; } }
        public bool IsZero { get { return OrgPrice == 0; } }
        public bool IsPink { get { return this.IsZero == false && this.IsOver == false && this.OrgPrice >= this.OverSt && this.OrgPrice <= this.OverEn; } }
        public bool IsDummy { get; set; }
        public string PriceShow { get { return this.Price.ToString().Replace(".00", ""); } }
        public string ShowTex
        {
            get
            {
                //    return string.Format("{0}=  {1}",Number,Price.ToString().PadLeft(10,'.').ToString());
                return string.Format("{0}=", Number);
            }
        }
        public decimal OverSt { get; set; }
        public decimal OverEn { get; set; }
        public decimal LimitPrice { get; set; }
        public ShowNumberDTO Clone()
        {
            return (ShowNumberDTO)this.MemberwiseClone();
        }
    }
    public class NumberTypeDTO
    {
        public string Name { get; set; }
        public string value { get; set; }
    }
    public class TimeShow
    {
        public DateTime ExportDate { get; set; }
        public string ShowDate { get { return ExportDate.ToString("yyyy'-'MMM'-'dd'T'HH':'mm':'ss"); } }
    }
}
